package com.atguigu.spring6.iocxml.dimap;

import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestStu {

    @Test
    public void testStu(){
        ApplicationContext context=
                new ClassPathXmlApplicationContext("bean-dimap.xml");
        Student student=context.getBean("student",Student.class);
        student.run();
    }
    @Test
    public void testStu1(){
        ApplicationContext context=
                new ClassPathXmlApplicationContext("bean-diref.xml");
        Student student=context.getBean("student",Student.class);
        student.run();
    }
    @Test
    public void testStu2(){
        ApplicationContext context=
                new ClassPathXmlApplicationContext("bean-diref.xml");
        Student student=context.getBean("studentp",Student.class);
        student.run();
    }
}
